// Taken from last year's labs
import java.util.Scanner;
public class Lab02_Task4 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String n = s.next();
float qty = s.nextFloat();
float ppi = s.nextFloat();
float cpd = s.nextFloat();
float toCharge = qty*ppi;
String out = "";
if (cpd >= toCharge) {
double change = cpd - toCharge;
if (cpd > toCharge) {
System.out.println("Your change is: N$ "+String.format("%.2f", change));
} else {
System.out.println("Your change is: N$ 0.00");
}
System.out.print("Disbursed as follows: ");
if (change >= 200) {
int twoh =(int) change/200;
change =(int) change-twoh*200;
out = twoh+" x N$ 200; ";
//System.out.print(out);
}
if (change >= 100) {
int oneh =(int) change/100;
change = change-(float)oneh*100;
out = oneh+" x N$100; ";
//System.out.print(out);
}
if (change >= 50) {
int fit =(int) change/50;
change = change-(float)fit*50;
out = fit+" x N$50; ";
//System.out.print(out);
}
if (change >= 20) {
int tty =(int) change/20;
change =change-(float)tty*20;
out = tty+" x N$20; ";
}else {
System.out.print("0 x N$20; ");
}
System.out.print(out);
if (change >= 10) {
int ten =(int) change/10;
change =change-(float)ten*10;
out = ten+" x N$10; ";
System.out.print(out);
} else {
System.out.print("0 x N$10; ");
}
if (change >= 5) {
int five =(int) change/5;
change =change-(float)five*5;
out = five+" x N$5; ";
System.out.print(out);
}else {
System.out.print("0 x N$5; ");
}
if (change >= 1) {
//double onee =change/1;
int oned =(int)change/1;
change =change-oned*1;
out = oned+" x N$1; ";
System.out.print(out);
}else {
System.out.print("0 x N$1; ");
}
//System.out.println("\n // "+change+" \\\\");
if (change >= 0.5) {
double fcent =change*2;
change =change%0.5;
//System.out.println("\n // "+change+" \\\\");
out = (int)fcent+" x 50c; ";
System.out.print(out);
}else {
System.out.print("0 x 50c; ");
}
//System.out.println("\n // "+change+" \\\\");
if (change >= 0.1) {
double tenc =change*10;
change =change%10;
out = (int)tenc+" x 10c; ";
System.out.print(out);
}else {
System.out.print("0 x 10c; ");
}
//System.out.println("\n // "+change+" \\\\");
if (change >= 0.05) {
System.out.print("1 x 5c ");
}else {
System.out.print("0 x 5c ");
}
//System.out.println("\n // "+change+" \\\\");
//System.out.print("Disbursed as follows: "+out);
} else {
System.out.println("You'll need to pay more.");
}
}
}